import Vue from "vue";
import VueRouter from "vue-router"
Vue.use(VueRouter)
import Cinema from '@/views/Cinema'
import Mine from '@/views/Mine'
import Movie from '@/views/Movie'
import City from '@/components/City'
import ComingSoon from '@/components/ComingSoon'
import NowPlaying from '@/components/NowPlaying'
import Search from '@/components/search'




export default new VueRouter({
    mode:'history',
    
    routes:[
        {
            path:"/cine",
            component:Cinema
        },
        {
            path:"/mine",
            component:Mine
        },
        {
            path:"/movie",
            component:Movie,
            children:[{path:"city", component:City},
                      {path:"comingsoon", component:ComingSoon},
                      {path:"nowplaying", component:NowPlaying},
                      {path:"search", component:Search},
                       {path:"search", component:Search},
                       {path:"/*",redirect:"city"}
                    ]
        },
         {
            path:"/*",
           redirect:"/movie"
        },

    ]
})